home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / elk-2_0.lha / elk-2.0 / lib / misc / build next >
Text File  |  1992-11-02  |  1KB  |  88 lines

  1. . ../../config/system
  2. . ../../config/site
  3.  
  4. if [ _$gdbm = _yes ]; then
  5.     gdbm_c="gdbm.c"
  6.     gdbm_o="gdbm.o"
  7.     gdbm_rule="gdbm.o:        \$(H) ../util/symbol.h gdbm.c"
  8. fi
  9.  
  10. if [ _$load_obj != _ ]; then
  11.     linkext="../../scripts/linkext.$load_obj \$@ \$@"
  12. fi
  13.  
  14. echo Building Makefile.local...
  15. cat <<EOT >Makefile.local
  16. # This Makefile was produced by running ./build in this directory.
  17.  
  18. SHELL=/bin/sh
  19.  
  20. CC= ${cc-cc}
  21. CFLAGS= $cflags $obj_cflags
  22. LINTFLAGS= $lintflags
  23.  
  24. INC=    ../../include
  25.  
  26. H=    \$(INC)/config.h\\
  27.     \$(INC)/param.h\\
  28.     \$(INC)/object.h\\
  29.     \$(INC)/extern.h\\
  30.     \$(INC)/misc.h\\
  31.     \$(INC)/stkmem.h\\
  32.     \$(INC)/cstring.h
  33.  
  34. C=    c++.c\\
  35.     chdir.c\\
  36.     debug.c\\
  37.     hack.c\\
  38.     hunk.c\\
  39.     monitor.c\\
  40.     struct.c\\
  41.     unix.c $gdbm_c
  42.  
  43. O=    c++.o\\
  44.     chdir.o\\
  45.     debug.o\\
  46.     hack.o\\
  47.     hunk.o\\
  48.     monitor.o\\
  49.     struct.o\\
  50.     unix.o $gdbm_o
  51.  
  52. .c.o:
  53.     \$(CC) \$(CFLAGS) -I\$(INC) $gdbm_incl -c \$<
  54.     $linkext
  55.  
  56. all: \$(O)
  57.  
  58. c++.o:        \$(H) c++.c
  59. chdir.o:    \$(H) chdir.c
  60. debug.o:    \$(H) debug.c
  61. hack.o:        \$(H) hack.c
  62. hunk.o:        \$(H) hunk.c
  63. monitor.o:    \$(H) monitor.c
  64. struct.o:    \$(H) struct.c
  65. unix.o:        \$(H) unix.c
  66. $gdbm_rule
  67.  
  68. install: \$(O)
  69.     -@if [ ! -d $lib_dir ]; then \\
  70.         echo mkdir $lib_dir; \\
  71.         mkdir $lib_dir; \\
  72.     fi
  73.     @for i in \$(O) ;\\
  74.     do \\
  75.         echo cp \$\$i $lib_dir; \\
  76.         cp \$\$i $lib_dir; \\
  77.     done
  78.  
  79. lint:
  80.     lint \$(LINTFLAGS) -I\$(INC) $gdbm_incl \$(C)
  81.  
  82. clean:
  83.     rm -f *.o core
  84.  
  85. distclean:
  86.     rm -f *.o core lint.out Makefile.local
  87. EOT
  88.